//
//  enums.swift
//  OneMeeting
//
//  Created by zhangheng on 2019/8/12.
//  Copyright © 2019 www.zhangheng.com. All rights reserved.
//

import Foundation

// 支付后台 0：每天，1：每月，2：每年，3：半年
// 接口规则：code 0:成功，2000：拉黑，2001:版本强制更新
// 首页请求参数type类型： 1：一体机，2：安卓，3：iOS，4：windows，5：安卓国际版，6：mac


enum OneRole{
    case host
    case join
}

enum OneStatus {
    case normal
    case highlight
    case hover
    case selected
}

enum OnePushType {
    case record
    case live
    case unKnow
}

typealias ResultNo                  = () -> ()
typealias ResultString              = (String) -> ()
typealias ResultFail                = (Int,String) -> ()
typealias ResultFail_opt            = (Int,String?)->()
typealias ResultSuccess             = ([String:Any]?) -> ()
typealias ResultLast                = ([String:Any]?) -> ()
typealias ResultSuccess_obj         = ([String:AnyObject]?) -> ()
typealias ResultIsSuccess           = (Bool,[String:Any]) -> ()
typealias ResultBool                = (Bool) -> ()
typealias ResultInt                 = (Int) -> ()

//带有view
typealias OneButtonBlock            = (NSButton)->()
typealias OneViewBlock              = (NSView)->()
typealias OneUserFullInfoSuccess    = ([OneUserFullInfo])->()
typealias OneHightMune              = ((TableRowView,ZHButton)->())
typealias OneStatusBlock            = (OneStatus)->()
typealias OneActionBlock            = (NSMenuItem)->()
typealias OneTapClick               = (NSView,NSEvent)->()
typealias OneDraggedEvent           = (NSView,NSEvent)->()
typealias OneGroupMemberSuccess     = ([OneGroupMemberInfo])->()

struct OneGroupMemberInfo{
    var friendRemark:String?
    var nameCard:String?
    var faceURL:String?
    var userID:String!
    var nickName:String?
}

struct OneUserFullInfo {
    var faceURL:String?
    var userID:String!
    var nickName:String?
}

struct OneInfo {
    var roomId:String!
    var userId:String!
}
